Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed weight ignore issue on grade calculation #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amir-qayyum-khan
Copy link

@amir-qayyum-khan amir-qayyum-khan commented Apr 4, 2018

What are the relevant tickets?

fixes #95

Background:

  • Add Grade to assignment.
  • Expected behaviour: Grader will offer a grade between 0 and 100, and should be multiplied by weight to get % of full problem.
  • Actual behaviour: Grade is a grade between 0 and 100. Problem weight seems to be ignored.

What's this PR do?

In this PR i am using weight to calculate grade percentage. Applied this logic on two points. Images are attached to demonstrate.

How should this be manually tested?

  • set weight from studio and observe grade

@pdpinch

Screenshots (if appropriate)

screen shot 2015-06-04 at 6 18 57 pm

screen shot 2015-06-04 at 6 18 54 pm

screen shot 2015-06-04 at 6 18 41 pm

@codecov-io
Copy link

codecov-io commented Apr 4, 2018

Codecov Report

Merging #242 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage    92.4%   92.46%   +0.05%     
==========================================
  Files          15       15              
  Lines        1594     1606      +12     
  Branches      101      101              
==========================================
+ Hits         1473     1485      +12     
  Misses        111      111              
  Partials       10       10
Impacted Files Coverage Δ
edx_sga/sga.py 94.03% <100%> (+0.04%) ⬆️
edx_sga/tests/integration_tests.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e8419b...d4b632f. Read the comment docs.

@amir-qayyum-khan
Copy link
Author

fixed atomic block issue in make_student.

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/base.py", line 973, in delete
    collector.collect([self], keep_parents=keep_parents)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/deletion.py", line 222, in collect
    elif sub_objs:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 258, in __nonzero__
    return type(self).__bool__(self)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 254, in __bool__
    self._fetch_all()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 1118, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.

@pdpinch
Copy link
Member

pdpinch commented Nov 27, 2018

@amir-qayyum-khan can you rebase this and address the merge conflicts?

I've been sitting on this for a while because I'm not certain what the actual requirement is. Once it's rebased I'll run it by someone from the MITx team to get their input.

@amir-qayyum-khan
Copy link
Author

rebased @pdpinch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grading does not honor max_score and weight properly
3 participants